﻿using Yxinmt.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yxinmt.Components
{
    public class BorderPanelComponent : BaseComponent, IComponent
    {
        Controls.Border _Border { get; set; }

        public BorderPanelComponent(Dictionary<string, object> property, IWindow form)
        {
            _Property = property;
            Window = form;
            this.InitSet();

            this.ControlList = new List<IControl>();

            _Border = new Controls.Border(_Property, this);
            this.ControlList.Add(_Border);

            ComponentList = new List<IComponent>();
            SetView();

            var list = this.GetComponentsElements();
            if (list.Count == 1) _Border.Add(list[0]);
        }

        public override void SetBackColor(string color)
        {
            _Border.SetBackColor(color);
        }
    }
}
